package com.yan.demo.inner;

public class Demo1 {
    public static void main(String[] args) {
        Outer.Inner inner = new Outer().new Inner();
        System.out.println(inner.innerNum);
        System.out.println(inner.num);
    }
}

class Outer{
    public int num = 10;
    public int outerNum = 20;

     class Inner{
        public int num = 100;
        public int innerNum = 200;

        public  void test(){
            Outer outer = new Outer();
            System.out.println("outer.outerNum = " + outer.outerNum);
        }
    }

    public void test(){
        Inner inner = new Inner();
        System.out.println("inner.innerNum = " + inner.innerNum);
       inner.test();
    }

}
